package com.darthsith.droidathome.core.model;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

/**
 * Model class for User
 * 
 * @author andrea
 *
 */

@Entity
@Table(name="USER")
public class User {

	@Id
	@Column(name="USERNAME")
	private String username;
	@Column(name="FIRSTNAME")
	private String firstname;
	@Column(name="LASTNAME")
	private String lastname;
	@Column(name="EMAIL")
	private String email;
	@Column(name="TICKET")
	private String ticket;

	public User() {}
	
	public User(String username, String firstname, String lastname, String email) {
		this.username=username;
		this.firstname=firstname;
		this.lastname=lastname;
		this.email=email;
	}
	
	public String getUsername() {
		return username;
	}
	public void setUsername(String username) {
		this.username = username;
	}
	public String getFirstname() {
		return firstname;
	}
	public void setFirstname(String firstname) {
		this.firstname = firstname;
	}
	public String getLastname() {
		return lastname;
	}
	public void setLastname(String lastname) {
		this.lastname = lastname;
	}
	public String getEmail() {
		return email;
	}
	public void setEmail(String email) {
		this.email = email;
	}
	public String getTicket() {
		return ticket;
	}
	public void setTicket(String ticket) {
		this.ticket = ticket;
	}
	
	@Override
	public String toString() {
		return "[Username: "+username+" - Firstname: "+firstname+" - Lastname: "+lastname+
				" - Email: "+email+" |||HAS TICKET? : "+ticket;
	}
	
}
